bitkeeper revision 1.1389.5.24 (427b3e32MTKLAKufH_gNCYPoIbG71g)
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 6 May 2005 09:51:46 +0000 (09:51 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 6 May 2005 09:51:46 +0000 (09:51 +0000)
Xen can parse the ACPI tables to get IOAPIC information -- we can rely
on domain0 to fill in information we miss because Xen lacks an ACPI
interpreter.
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/acpi.c
xen/arch/x86/mpparse.c

index 8df006478a904e5eddfb0f7913725c5495fada1e..4d3cc212b1423f8d422e9e1f06058f52559acf53 100644 (file)
@@ -189,7 +189,7 @@ acpi_parse_lapic_nmi (
 
 #endif /*CONFIG_X86_LOCAL_APIC*/
 
-#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER)
+#if defined(CONFIG_X86_IO_APIC) /*&& defined(CONFIG_ACPI_INTERPRETER)*/
 
 static int __init
 acpi_parse_ioapic (
@@ -211,6 +211,7 @@ acpi_parse_ioapic (
        return 0;
 }
 
+#ifdef CONFIG_ACPI_INTERPRETER
 /*
  * Parse Interrupt Source Override for the ACPI SCI
  */
@@ -244,6 +245,7 @@ acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
        acpi_sci_override_gsi = gsi;
        return;
 }
+#endif
 
 static int __init
 acpi_parse_fadt(unsigned long phys, unsigned long size)
@@ -277,11 +279,13 @@ acpi_parse_int_src_ovr (
 
        acpi_table_print_madt_entry(header);
 
+#ifdef CONFIG_ACPI_INTERPRETER
        if (intsrc->bus_irq == acpi_fadt.sci_int) {
                acpi_sci_ioapic_setup(intsrc->global_irq,
                        intsrc->flags.polarity, intsrc->flags.trigger);
                return 0;
        }
+#endif
 
        mp_override_legacy_irq (
                intsrc->bus_irq,
@@ -460,13 +464,14 @@ acpi_boot_init (void)
 
 #endif /*CONFIG_X86_LOCAL_APIC*/
 
-#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER)
+#if defined(CONFIG_X86_IO_APIC) /*&& defined(CONFIG_ACPI_INTERPRETER)*/
 
        /* 
         * I/O APIC 
         * --------
         */
 
+#if 0
        /*
         * ACPI interpreter is required to complete interrupt setup,
         * so if it is off, don't enumerate the io-apics with ACPI.
@@ -476,6 +481,7 @@ acpi_boot_init (void)
        if (acpi_disabled || acpi_noirq) {
                return 1;
        }
+#endif
 
        /*
         * if "noapic" boot option, don't look for IO-APICs
@@ -510,12 +516,14 @@ acpi_boot_init (void)
                return result;
        }
 
+#ifdef CONFIG_ACPI_INTERPRETER
        /*
         * If BIOS did not supply an INT_SRC_OVR for the SCI
         * pretend we got one so we can set the SCI flags.
         */
        if (!acpi_sci_override_gsi)
                acpi_sci_ioapic_setup(acpi_fadt.sci_int, 0, 0);
+#endif
 
        result = acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src);
        if (result < 0) {
index 97c85aad53b8ec10d262921e2ba377a7b0b05a45..6b4599fdf4e4419a2c9618823daff5e312966761 100644 (file)
@@ -1017,7 +1017,7 @@ void __init mp_register_lapic (
        MP_processor_info(&processor);
 }
 
-#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER)
+#if defined(CONFIG_X86_IO_APIC) /*&& defined(CONFIG_ACPI_INTERPRETER)*/
 
 #define MP_ISA_BUS             0
 #define MP_MAX_IOAPIC_PIN      127
@@ -1085,7 +1085,7 @@ void __init mp_register_ioapic (
        mp_ioapic_routing[idx].irq_end = irq_base + 
                io_apic_get_redir_entries(idx);
 
-       printk("IOAPIC[%d]: apic_id %d, version %d, address 0x%lx, "
+       printk("IOAPIC[%d]: apic_id %d, version %d, address 0x%x, "
                "IRQ %d-%d\n", idx, mp_ioapics[idx].mpc_apicid, 
                mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr,
                mp_ioapic_routing[idx].irq_start,